<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">

<title>绑定仁济账户页面</title>

<!-- Bootstrap core CSS -->
<link href="<%=basePath%>/css/bootstrap.min.css" rel="stylesheet">

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="<%=basePath%>/css/ie10-viewport-bug-workaround.css"
	rel="stylesheet">

<!-- Custom styles for this template -->
<link href="<%=basePath%>/css/signin.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="<%=basePath%>/js/ie-emulation-modes-warning.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/jquery.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<script language="javascript">
	function toVaild() {
		var RJUSERNAME = document.getElementById("RJUSERNAME").value;
		var RJPASSWD = document.getElementById("RJPASSWD").value;

		var htmlobj = $.ajax({
			url : "<%=basePath%>dosomequery?querytype=bindrj&RJUSERNAME=" + RJUSERNAME
					+ "&RJPASSWD=" + RJPASSWD,
			async : false
		});
		//alert(htmlobj.responseText);
		//return false;
		if (htmlobj.responseText.indexOf('ok')!=-1)
			{
			alert('绑定成功');
			return true;
			}
		else
			{
			alert('绑定失败:'+htmlobj.responseText)
			return false;
			}

	}
</script>
<link href="<%=basePath%>css/justified-nav.css"	rel="stylesheet">

</head>

<body>
	<div class="masthead">
     
        <nav>
          <ul class="nav nav-justified">
            <li class="active"><a href="<%=basePath%>SigninServlet">首页</a></li>
         <li><a href="<%=basePath%>jsp/signin.jsp">退出</a></li>
            <li><a href="<%=basePath%>jsp/regist.jsp">注册</a></li>
            <li><a href="http://www.shdc.org.cn/familyServices/index">上海市医院报告查询和门诊预约</a></li>
            <li><a href='<%=basePath%>jsp/downrj.jsp'>下载仁济app</a></li>            
          </ul>
        </nav>
      </div>
	<div class="container">

		<form class="form-signin" action="<%=basePath%>dosomequery"
			method="get" onsubmit="return toVaild()">
			
			<h3 class="form-signin-heading">请先绑定仁济注册账户!，必须绑定才能查看报告</h3>
			请输入仁济用户名<input name="RJUSERNAME" id="RJUSERNAME" type="text"
				class="form-control" placeholder="仁济用户名" required autofocus>
			请输入仁济密码<input name="RJPASSWD" type="text" id="RJPASSWD"
				class="form-control" placeholder="仁济密码" required autofocus>
			<input type='text' style='display:none' value='rjinput' name='querytype'>

			<button class="btn btn-lg btn-primary btn-block" type="submit">绑定</button>

		</form>
		<p>截图里面的红圈圈的用户名密码填到绑定框框里</p>
		<img src="<%=basePath%>jsp/rjlog.jpg"  alt="截图里面的红圈圈的用户名密码填到绑定框框里" />
	</div>
	<!-- /container -->


	<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
	<script src="<%=basePath%>/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
